using System;
using Graphe.Data;

namespace Graphe
{
    public class Settings
    {
        #region Singleton

        private static Settings _instance;

        public static Settings Instance
        {
            get
            {
                if (_instance == null)
                    _instance = new Settings();

                return _instance;
            }
        }

        #endregion
        #region Public Properties

        /// <summary>
        /// The last directory accessed.
        /// </summary>
        public string LastIndexPath { get; set; }

        public string LastCollationPath { get; set; }

        #endregion

        /// <summary>
        /// Saves the settings to isolated storage.
        /// </summary>
        public void Save()
        {
            IsolatedStorageProvider.Instance.SaveSettings(this);
        }

        /// <summary>
        /// Loads the settings from isolated storage.
        /// </summary>
        public static void Load()
        {
            IsolatedStorageProvider.Instance.LoadSettings();
        }
    }
}
